<template>
  <div class="section1 clearfix" style="background-image:url(./static/background.jpg)">
    <div class="section1-title"><h2><img src="@/assets/images/logo.svg" />启辕车辆管理数据展示板</h2></div>
    <div class="clearfix wel-row">
      <router-link class="wel-li" :to="'/section1?marketId=1'" target="_blank"><h2 >启辕汽车连锁商城管理系统-车源实时库存信息</h2></router-link>
      <router-link class="wel-li" :to="'/section2?marketId=1'" target="_blank"><h2 >启辕汽车连锁商城管理系统-车辆特征分析与排行</h2></router-link>
    </div>
    <div class="clearfix wel-row" v-if="showMarket">
      <router-link  class="wel-li" :to="'/section3?marketId='+marketId" target="_blank"><h2>{{res.marketInfo.marketShortName}}-车源实时库存信息</h2></router-link>
      <router-link  class="wel-li" :to="'/section4?marketId='+marketId" target="_blank"><h2>{{res.marketInfo.marketShortName}}-车辆特征分析与排行</h2></router-link>
      <router-link  class="wel-li" :to="'/section5?marketId='+marketId" target="_blank"><h2>{{res.marketInfo.marketShortName}}-车辆检测与交易信息</h2></router-link>
    </div>
    
  </div>
</template>

<script>
export default {
  name: 'welcome',
  data () {
    return {
      msg: '',
      marketId:'1',
      showMarket:true,
      res:{
        marketInfo:{}
      }
    }
  },
  mounted(){
  },
  created(){
    this.marketId = sessionStorage.getItem("marketId") || '1';
    if (this.marketId == '1') {
      this.showMarket = false
    }
    axios.get('/controller/getMarketList?marketId='+this.marketId)//获取出入库品牌对比
    .then((response)=> {
      this.res.marketInfo = response.data.result[0]
    })
  },
  methods: {

  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.wel-row{
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  height: 40%;
  margin-bottom: 2%;
  

}
  .wel-li{
    width: 100%;
    text-align: center;
    background-color: #12152b;
    border-radius: 10px;
    color: #fff;
    font-size: 24px;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    margin: 20px;
    cursor: pointer;
    box-sizing: border-box;
    border:1px solid #234B9B;
    height: 100%;
    position: relative;
    

  }
  .wel-li h2{

    color: #fff;
    font-size: 24px;
    display: inline-block;
    height: 40px;
    line-height: 40px;
    width: 100%;
    left: 0;
    top: 50%;
    margin-top: -20px;

    position: absolute;

  }
</style>
